home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 273_01 / striprng.cc < prev    next >
Encoding:
Text File  |  1987-09-26  |  336 b   |  15 lines

  1. striprange(char *str,char clo,char chi)
  2. /* This will strip all occurances of the characters that fall between
  3.    char clo and chi out of the string pointed to by *str.
  4. */
  5. {
  6.    char *newstr;
  7.  
  8.    newstr = str;
  9.    while (*str) {
  10.       if ((*str > chi) | (*str < clo))
  11.      *newstr++ = *str;
  12.       str++; }
  13.    *newstr = '\0';
  14. }
  15.